package Work2;
import java.util.Random;
import java.util.ArrayList;

public class RandomNum {
	public static void main(String[] args) {
		ArrayList<Integer> rdnum = Random_num();
		for(int i=0;i<rdnum.size();i++) {
			System.out.println(rdnum.get(i));
		}
	}
	
	public static ArrayList<Integer> Random_num(){
		Random rd = new Random();
		ArrayList<Integer> randomnum = new ArrayList<Integer>();
		int t = 0;
		while(t<6) {
			int num = rd.nextInt(33)+1;
			int Isexit = 0;
			for(int i=0;i<t;i++) {
				if(num == randomnum.get(i)) {
					Isexit = 1;
				}
			}
			if(Isexit == 0) {
				randomnum.add(num);
				t++;
			}
		}
		return randomnum;
	}
}
